package com.wuxx.quartz.model;


import com.wuxx.quartz.job.QuartzTaskJob;

import java.util.Map;

/**
 * 构建定时的model
 * @date 2022/06/08 10:03
 * @author wuxx
 */
public class TimingModel {
    /**
     * 该定时的任务处理器
     */
    private Class<? extends QuartzTaskJob> taskClass;

    /**
     * 任务名
     */
    private String taskName;
    /**
     * 任务组名
     * */
    private String groupName;

    /**
     * 任务描述
     * */
    private String description;


    /**
     * 任务类型
     */
    private TriggerType type;


    /**
     * 任务参数,可在具体的QuartzTaskJob实现中获取这些参数
     * */
    private Map<String, Object> param;

    /**
     * 任务状态
     * */
    private String taskStatus;

    public TimingModel(Class<? extends QuartzTaskJob> taskClass, String taskName, String groupName, String description, TriggerType type, Map<String, Object> param) {
        this.taskClass = taskClass;
        this.taskName = taskName;
        this.groupName = groupName;
        this.description = description;
        this.type = type;
        this.param = param;
    }

    public TimingModel(Class<? extends QuartzTaskJob> taskClass, String taskName, String groupName, String description, TriggerType type) {
        this.taskClass = taskClass;
        this.taskName = taskName;
        this.groupName = groupName;
        this.description = description;
        this.type = type;
    }

    public Class<? extends QuartzTaskJob> getTaskClass() {
        return taskClass;
    }

    public void setTaskClass(Class<? extends QuartzTaskJob> taskClass) {
        this.taskClass = taskClass;
    }

    public String getTaskName() {
        return taskName;
    }

    public void setTaskName(String taskName) {
        this.taskName = taskName;
    }

    public String getGroupName() {
        return groupName;
    }

    public void setGroupName(String groupName) {
        this.groupName = groupName;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public TriggerType getType() {
        return type;
    }

    public void setType(TriggerType type) {
        this.type = type;
    }

    public Map<String, Object> getParam() {
        return param;
    }

    public void setParam(Map<String, Object> param) {
        this.param = param;
    }

    public String getTaskStatus() {
        return taskStatus;
    }

    public void setTaskStatus(String taskStatus) {
        this.taskStatus = taskStatus;
    }
}
